﻿using Orleans.Streams;

namespace orleans_demo.Services
{
    // IUserIndexGrain.cs
    public interface IUserIndexGrain : IGrainWithStringKey
    {
        Task AddUser(UserInfo user);
        Task RemoveUser(string userId);
        Task<List<UserInfo>> GetAllUser();
    }

    public interface IUserQueryGrain : IGrainWithStringKey
    {
        Task<(List<UserInfo> Users, bool HasMore)> GetUsers(int pageNumber, int pageSize);
        Task SubscribeUpdates(IAsyncObserver<UserEvent> observer);
    }
}
